<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>毕业论文管理系统</title>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script type="text/javascript" src="./js/jquery-3.3.1.min.js"></script>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>

</head>
<body class="login-bg">
	<div class="login layui-anim layui-anim-up">
		<div class="message">
			<img alt="" src="./images/logo_school.png"><img alt=""
				src="./images/t.png">
		</div>
		<div id="darkbannerwrap"></div>

		<form method="post" class="layui-form" action="${pageContext.request.contextPath }/login.do">
			<input name="no" id="no" placeholder="用户名" type="text"
				lay-verify="required" class="layui-input">
			<hr class="hr30">
			<input name="password" id="password" lay-verify="required"
				placeholder="密码" type="password" class="layui-input">
			<hr class="hr30">
			<div style="text-align: center;">
				<input type="radio" name="identity" value="student" title="学生"checked> 
				<input type="radio" name="identity"	value="teacher" title="教师"> 
				<input type="radio"	name="identity" value="jury" title="审核人员"> 
				<input type="radio" name="identity" value="admin" title="学院">
			</div>
			<hr class="hr30">
			<input value="登录" lay-submit lay-filter="login"
				style="width: 100%;" type="submit">
			<hr class="hr15">
		</form>
		<div id="emsg" style="display: none" >${msg }</div>
	</div>

	<script>
		$(function () {
			layui.use('layer', function(){
				var layer = layui.layer;//监听layer，否则不能用
				if($("#emsg").text() != "")
					layer.msg($("#emsg").text(),{
						time : 2000,
						icon : 5,
						anim : 6,
						area : ['250px', '60px']
					});
			});
		});
		/*  $(function  () {
            layui.use('form', function(){
	              var form = layui.form;
	              // layer.msg('玩命卖萌中', function(){
	              //   //关闭后的操作
	              //   });
	              //监听提交
	              form.on('submit(login)', function(data){
	                //alert(888)
	                   layer.msg(JSON.stringify("欢迎你"+data.field.username),{time:1500},function(){
	                    location.href='index.jsp'
	                }); 
	                var no = $("#no").val();
	            	var password = $("#password").val();
	                $.ajax({
	                	async:false,
	            		url : "${pageContext.request.contextPath }/login.do",
	            		type : "post", 
	            		data :JSON.stringify({no:no,password:password}),
	            		contentType : "application/json;charset=UTF-8",
	            		dataType : "json",
	            		//成功响应的结果
	            		success : function(data){
	            			if(data != null){					
	            				layer.msg("欢迎你，"+data.no),{time:1500},function(){
	            					window.location.href='index.jsp'
	            				}
	            			}
	            		}
	              	});
	                return false;
            	});
            });
        })
 		*/
        
    </script>

</body>
</html>